<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="/static/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="/static/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="/static/lib/icheck/icheck.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="/static/lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="/static/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->

<title>添加管理员</title>
</head>
<body>
<div class="pd-20">
	<form action="/admin/category/saveOrUpdate" method="post" class="form form-horizontal" id="form-admin-add">
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>类别名：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="" placeholder="" id="name" name="name" datatype="*2-16" nullmsg="类别名不能为空">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>优先级：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="" placeholder="" id="sort" name="sort" datatype="n1-3">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">描述：</label>
			<div class="formControls col-5">
				<textarea name="description" cols="" rows="" class="textarea"  placeholder="说点什么...100个字符以内" dragonfly="true" onKeyUp="textarealength(this,100)"></textarea>
				<p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<div class="col-9 col-offset-3">
				<input class="btn btn-primary radius" id="btnSubmit" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
</div>
<script type="text/javascript" src="/static/lib/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="/static/lib/Validform/5.3.2/Validform.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer2.1/layer.js"></script>
<script type="text/javascript" src="/static/js/H-ui.js"></script> 
<script type="text/javascript" src="/static/js/H-ui.admin.js"></script> 
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$("#form-admin-add").Validform({
		btnSubmit:"#btnSubmit",
		ajaxPost:true,
		tiptype:2,
		callback:function(data){
			if(data.code!="1006"){
				layer.msg(data.description,{time: 1000, icon:6});
			}else{
				layer.msg(data.description,{time: 1000, icon:6},function(){
					var index = parent.layer.getFrameIndex(window.name);
					if( typeof (parent.window.getDataList) === 'function' ){
					    //存在且是function;
						parent.window.getDataList();
					}else{
					    //不存在或不是function
						parent.frames.getCateList();
					}
					parent.layer.close(index);
				});
				
			}
			
		}
	}); 
});
</script>
</body>
</html>